<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/7/10
  Time: 16:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>编号管理</title>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8 ? MYOA_CHARSET : htmlspecialchars($HTML_PAGE_CHARSET))?>" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="/lib/layui/layui/css/layui.css?20190817.1">
    <link rel="stylesheet" href="/lib/layui/layui/css/common.css">
    <link rel="stylesheet" href="/lib/layui/layui/css/eleTree.css">
    <script type="text/javascript" src="/js/jquery/jquery-1.9.1.js"></script>
    <script src="/lib/layui/layui/layui.js"></script>
    <script src="/lib/jquery.form.min.js"></script>
    <script src="/lib/layui/layui/js/common.js?v=20190726" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/layui/layui/js/baseCode/base.js?v=2019080918:09" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="/lib/layui/layui/global.js"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <style>
        .locality-p{
            height: 40px;
            /*background: #3791DA;*/
            /*color: #fff;*/
            font-size: 18px;
            line-height: 40px;
            /*border-bottom:1px solid #9E9E9E;*/
            display: inline-block;
            padding:0 10px;
            margin: 10px;
            /*border-radius: 10px;*/
            /*border-right: 1px solid;*/
        }
        .content{
            width: 100%;
            height: 100%;
            border: 1px solid #9E9E9E;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <p class="locality-p"><img src="/img/commonTheme/theme6/wangluo.png" style="margin-right: 5px"></img>合同编号管理</p>
        </div>
        <div class="content">
            <%--            表格--%>
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <div style="padding: 0px 8px">
                            <table id="demo" lay-filter="test"></table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
<script>
    layui.use(['treeTable', 'table', 'layer', 'form', 'element', 'laydate', 'upload',], function () {
        var table = layui.table,
            form = layui.form,
            layer = layui.layer,
            laydate = layui.laydate,
            upload = layui.upload,
            treeTable = layui.treeTable,
            element = layui.element;

        //自定义格式
        laydate.render({
            elem: '#test11'
            ,format: 'yyyy年MM月dd日'
        });
        table.render({
            elem: '#demo'
            , url: '/ContractNo/findContractNo'

            , page:true
            ,cols: [[
                {field:'contractName',title:'合同名称',align:'center'}
                ,
                {
                    field: 'contractNo', title: '合同编号', align: 'center'}
                , {field: 'contractType', title: '合同类型', align: 'center'}
                , {field: 'doUnit', title: '承办单位', align: 'center'}
                , {
                    field: 'no4', title: '4位顺序号', align: 'center'}
                , {
                    field: 'businessType', title: '业务分类', align: 'center'},
                {field: 'no3', title: '3位顺序号', align: 'center'}
                , {field: 'noTime',align: 'center', title: '年月',templet: function(d){
                        return format(d.noTime)
                    }}
            ]]
            ,parseData: function(res){ //res 即为原始返回的数据
                return {
                    "code": 0, //解析接口状态
                    "msg": res.msg, //解析提示文本
                    "count": res.totleNum, //解析数据长度
                    "data": res.obj //解析数据列表

                };
            }
        });
        //将毫秒数转为yyyy-MM-dd格式时间
        function format(t) {
            if (t) return new Date(t).Format("yyyy-MM-dd");
            else return ''
        }
    })
</script>
